1. Field of the Invention
The present invention relates to devices and methods for reading and writing tape recording media, and to recording media. More specifically, the present invention relates to a device and a method for reading and writing a tape recording medium in which a magnetic tape divided into a plurality of partitions is easily managed, and to a recording medium.
2. Description of the Related Art
Tape streamer devices are known as read/write devices for reading or writing (hereinafter referred to as xe2x80x9creading/writingxe2x80x9d if necessary) digital data to/from a magnetic tape. Such tape streamer devices have huge recording capacities of, for example, few tens to few hundreds of gigabytes, depending on the tape length of a tape cassette, that is, a medium. Therefore, the tape streamer devices are widely employed for purposes including backup of data written to a medium, such as a hard disk of a computer. In addition, the tape streamer devices are suitable for storing image data or the like whose data size is large.
The above tape streamer devices include, for example, a device for reading/writing data using a helical scan system by a rotary head in which a tape cassette of an 8-mm video cassette recorder (VCR) is used as a recording medium.
Generally, a magnetic tape to or from which data is written or read by the tape streamer device is wound onto a reel rotatably mounted in a cassette casing.
The tape cassette winds and stores the magnetic tape using the reel which is rotatably mounted. There are two types of tape cassettes. One type has a single reel and another type has two reels.
The former type with a single reel is required to rewind the tape before the tape cassette is ejected from the tape streamer device because it has only one reel.
For the latter type with two reels, it is preferable to completely rewind the magnetic tape onto one reel when storing data for a long period of time. When a data recording surface is exposed for a long period of time, dust may adhere to the surface even though the tape is held inside the cassette. For this reason, the tape cassette is generally ejected from the tape streamer device after the magnetic tape is rewound to the head thereof.
Accordingly, when the magnetic tape is required to be rewound to the head and then to be ejected from the tape streamer device, it is necessary to read or write data up to the middle of the magnetic tape, terminate reading or writing at that position, and rewind the magnetic tape to the head when ejecting the tape cassette. Therefore, a long period of time is required from the termination of the reading or writing operation until the tape cassette is actually ejected.
To this end, so-called multi-partitions are proposed in which the magnetic tape is divided into a plurality of partitions, and the magnetic tape can be loaded or unloaded at a boundary between nearest partitions.
Specifically, in the case of a single partition, as shown in FIG. 1A, the magnetic tape is provided with a device area (DA) 1 at the head thereof. After the DA 1 is provided a data area 2 from or to which data is read or written. The magnetic tape is loaded or unloaded at the DA 1, and data is only written to or read from the data area 2. Therefore, as shown in FIG. 1B, a logical block address (LBA) of the magnetic tape has a value increasing in accordance with movement of a tape 1 toward the back end of the tape.
In contrast, in the case of multi-partitions, as shown in FIG. 2A, the data area 2 in FIG. 1A is divided into a plurality of partitions 2-0 to 2-2 (in this example, there are three partitions). The partitions 2-0 to 2-2 have data areas 11-0 to 11-2 at the heads thereof. After the data areas 11-0 to 11-2, optional device areas (ODAs) 12-0 to 12-2 are disposed. As shown in FIG. 2B, the value of the LBA increases from the head to the back end within each of the data areas 11-0 to 11-2 of the partitions 2-0 to 2-2. In different partitions, the value of the LBA changes starting again from 0 to a larger value. Loading or unloading is performed at the DA 1 or the ODA 12-0 to 12-2.
Since the ODAs 12-0 to 12-2 are formed at the boundaries of the partitions 2-0 to 2-2, the magnetic tape is loaded or unloaded after moving from a predetermined position to the nearest ODA. As compared with the case of the single partition shown in FIGS. 1A and 1B, it is not necessary to always rewind the magnetic tape to the DA 1 at the head. It is only necessary to rewind or fast-forward the magnetic tape to the nearest ODA 12-0 to 12-2. This shortens the period of time required to rewind or fast-forward the magnetic tape. As a result, the magnetic tape can be unloaded more quickly.
When the multi-partition structure is used, management of access positions of the magnetic tape becomes complex. Many application programs are only capable of performing address management of single-partitioned magnetic tapes. Often, the application programs do not have a function for managing multi-partitioned magnetic tapes. As a result, when read/write control of the magnetic tape is performed using a number of application programs, it is not possible to quickly unload the tape.
Accordingly, it is an object of the present invention to perform unloading more quickly.
According to an aspect of the present invention, a device for reading and writing data to a tape recording medium includes a dividing unit for dividing a single tape recording medium into a plurality of partitions so that non-recording areas, for loading and unloading, in which data is not written are provided between adjacent partitions. A first detection unit detects the number of predetermined data units in each of the partitions. A second detection unit detects cumulative values, from the head partition, of the number of data units detected by the first detection unit. An arithmetic operation unit performs arithmetic on an access position on the tape recording medium based on the number of data units from the starting point of the partition to which the access position belongs up to the access position and on a sum of the cumulative values up to a partition immediately before the partition to which the access position belongs.
Preferably, the device includes a storage unit for storing the number of predetermined data units in each of the partitions. The first detection unit may perform detection based on the number of data units stored in the storage unit.
The first detection unit may detect the number of data units in each of the partitions based on the number of data items written on the tape recording medium and a mark indicating a boundary between the data items.
The device may further include a write unit for writing the number of data units in a memory pertaining to a cassette for receiving the tape recording medium.
According to another aspect of the present invention, an accessing method for a device for reading and writing data to a tape recording medium includes a dividing step of dividing a single tape recording medium into a plurality of partitions so that non-recording areas, for loading and unloading, in which data is not written are provided between adjacent partitions. In a detection step, the number of predetermined data units in each of the partitions is detected. In another detection step, cumulative values of the detected number of data units from the head partition are detected. In an arithmetic operation step, arithmetic is performed on an access position on the tape recording medium based on the number of data units from the starting point of the partition to which the access position belongs up to the access position and on a sum of the cumulative values up to a partition immediately before the partition to which the access position belongs.
According to another aspect of the present invention, a medium has recorded thereon a program for controlling reading and writing of data to a tape recording medium. The program includes a dividing step of dividing a single tape recording medium into a plurality of partitions so that non-recording areas, for loading and unloading, in which data is not written are provided between adjacent partitions. In a first detection step, the number of predetermined data units in each of the partitions is detected. In a second detection step, cumulative values, from the head partition, of the number of data units detected in the first detection step are detected. In an arithmetic operation step, arithmetic is performed on an access position on the tape recording medium based on the number of data units from the starting point of the partition to which the access position belongs up to the access position and on a sum of the cumulative values up to a partition immediately before the partition to which the access position belongs.